<%= simple_form_for([:admin, @organization], html: {class: 'form-horizontal form-show',id: 'organization_form' }) do |f| %>
<%= f.error_notification %>

  <%= f.input :name, required: true %>
  <%= f.association :parent %>
  <%= f.input :position %>
  <%= f.input :remark, as: :text %>

<div class="clearfix form-actions">
  <div class="col-md-offset-3 col-md-9">
    <%= f.button :submit, class: 'btn btn-primary' %>
  </div>
</div>
<% end %>

<script>
    $(function () {
        $('#organization_form').validator_b3({
            errorElement: 'div',
            errorClass: 'help-block',
            focusInvalid: false,
            rules: {
                "organization[sms_code]": {
                    required: true,
                    number:true
                }
            },
            messages: {
            }
        });


        $('.nav.nav-list li.active').removeClass('active');
        $('.nav.nav-list li[data-model="organization_list"]').addClass('active');
    } );
</script>